<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" charset="utf-8">
        //简单函数的链式调用
        function Dog() {
            this.run = function () {
                alert('dog is run...');
                return this;
            }
            this.eat = function () {
                alert('dog is eat');
            }
            this.sleep = function () {
                alert('dog is sleep...');
            }
        }
        var d1 = new Dog();
      d1.run().eat().sleep();
    </script>
</head>
<body>
</body>
</html>